<?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\web\ProductController;
use App\Http\Controllers\web\UserLoginController;


/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/**
 *支付
 */
Route::prefix('pay')->group(function (){
    Route::post('payList',[\App\Http\Controllers\web\PaymentController::class,'payList']);
    Route::post('payInsert',[\App\Http\Controllers\web\PaymentController::class,'payInsert']);
    Route::get('payDel',[\App\Http\Controllers\web\PaymentController::class,'payDel']);
    Route::get('payUp',[\App\Http\Controllers\web\PaymentController::class,'payUp']);
});
Route::get('l', [\App\Http\Controllers\web\MemberController::class, 'list']);
Route::get('address', [\App\Http\Controllers\web\AddressController::class, 'address']);
//cqf  跳转后台日志记录页面
Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index']);


//hsx
//拼团列表
Route::get('groupList', [\App\Http\Controllers\web\GroupController::class, 'groupList']);
//选择商品
Route::get('selectGoods', [\App\Http\Controllers\web\GroupController::class, 'selectGoods']);
//添加拼团
Route::post('addGroup', [\App\Http\Controllers\web\GroupController::class, 'addGroup']);
//删除拼团
Route::get('delGroup', [\App\Http\Controllers\web\GroupController::class, 'delGroup']);
//拼团详情
Route::get('groupDetails', [\App\Http\Controllers\web\GroupController::class, 'groupDetails']);
//拼团修改
Route::post('groupAlter', [\App\Http\Controllers\web\GroupController::class, 'groupAlter']);
//拼团商品列表
Route::get('CollageGoodsList',[\App\Http\Controllers\web\GroupController::class,'CollageGoodsList']);
//添加拼团商品
Route::post('addCollageGoods',[\App\Http\Controllers\web\GroupController::class,'addCollageGoods']);
//删除拼团商品
Route::get('delCollageGoods',[\App\Http\Controllers\web\GroupController::class,'delCollageGoods']);
//拼团商品详情
Route::get('detailsCollageGoods',[\App\Http\Controllers\web\GroupController::class,'detailsCollageGoods']);
//拼团商品修改
Route::post('updateCollageGoods',[\App\Http\Controllers\web\GroupController::class,'updateCollageGoods']);
//修改拼团商品状态
Route::get('changeDiscountStatus',[\App\Http\Controllers\web\GroupController::class,'changeDiscountStatus']);
//选择商品
Route::get('selectStoreProduct',[\App\Http\Controllers\web\GroupController::class,'selectStoreProduct']);
//查询商品信息
Route::get('storeProductFind',[\App\Http\Controllers\web\GroupController::class,'storeProductFind']);

/**
 * zyy
 */
Route::group(["prefix" => "commission"], function () {
//    列表查询
    Route::get("comWithHeadWithOrder", [\App\Http\Controllers\web\CommissionController::class, "comWithHeadWithOrder"]);
//    搜索查询
    Route::get("comSearch", [\App\Http\Controllers\web\CommissionController::class, "comSearch"]);
//    根据团购商品的价钱计算流水
    Route::get("comOrderStatus", [\App\Http\Controllers\web\CommissionController::class, "comOrderStatus"]);
//    excel上传
    Route::get("commissionExcel", [\App\Http\Controllers\web\CommissionController::class, "commissionExcel"]);
});
//*** why
Route::prefix('remark')->group(function (){
    //全部评论
    Route::get('shopRemarkAll', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkAll']);
    //删除评论
    Route::get('shopRemarkDel',[\App\Http\Controllers\web\ShopController::class,'shopRemarkDel']);
    //热卖推荐
    Route::get('recommendShop',[\App\Http\Controllers\web\ShopController::class,'recommendShop']);

    Route::get('manhattans',[\App\Http\Controllers\web\ShopController::class,'manhattans']);
    //回复
    Route::post('reply',[\App\Http\Controllers\web\ShopController::class,'reply']);
    //添加虚拟数据
    Route::post('shopRemarkAdd',[\App\Http\Controllers\web\ShopController::class,'shopRemarkAdd']);
    //七牛云上传
    Route::post('remarkImageUpload',[\App\Http\Controllers\web\ShopController::class,'remarkImageUpload']);
    //搜索
    Route::post('shopRemarkSearch',[\App\Http\Controllers\web\ShopController::class,'shopRemarkSearch']);
});
//积分模块 wsl
Route::prefix('integral')->group(function (){
    //积分流动记录
    Route::post('integralRecordingQuery',[\App\Http\Controllers\api\IntegralController::class,'integralRecordingQuery']);
    //积分流动记录删除
    Route::post('integralRecordingDelete',[\App\Http\Controllers\api\IntegralController::class,'integralRecordingDelete']);
});
//抽奖模块 wsl
Route::prefix('lottery')->group(function (){
    //抽奖记录查询
    Route::post('drawRecordsQuery',[\App\Http\Controllers\api\LotteryController::class,'drawRecordsQuery']);
    //奖品删除
    Route::get('drawRecordsDel',[\App\Http\Controllers\api\LotteryController::class,'drawRecordsDel']);

    Route::post('add',[\App\Http\Controllers\api\LotteryController::class,'add']);
});
//砍价
Route::prefix('bargain')->group(function (){
    //砍价商品
    Route::get('index',[\App\Http\Controllers\web\BargainController::class,'index'])->name('index');
    //砍价列表
    Route::get('bargainList',[\App\Http\Controllers\web\BargainController::class,'bargainList'])->name('bargainList');
    //砍价商品状态修改
    Route::get('bargainStatus',[\App\Http\Controllers\web\BargainController::class,'bargainStatus'])->name('bargainStatus');
    //砍价商品删除
    Route::get('bargainDel',[\App\Http\Controllers\web\BargainController::class,'bargainDel'])->name('bargainDel');
    //砍价商品添加
    Route::post('bargainCreate',[\App\Http\Controllers\web\BargainController::class,'bargainCreate'])->name('bargainCreate');
    //砍价商品修改
    Route::get('bargainRevamp',[\App\Http\Controllers\web\BargainController::class,'bargainRevamp'])->name('bargainRevamp');
    //砍价商品修改
    Route::post('bargainUpdate',[\App\Http\Controllers\web\BargainController::class,'bargainUpdate'])->name('bargainUpdate');
    //砍价商品搜索
    Route::get('searchData',[\App\Http\Controllers\web\BargainController::class,'searchData'])->name('searchData');
    //砍价列表商品搜索
    Route::get('searchListData',[\App\Http\Controllers\web\BargainController::class,'searchListData'])->name('searchListData');
    //商品列表
    Route::get('shopList',[\App\Http\Controllers\web\BargainController::class,'shopList'])->name('shopList');
    //商品列表
    Route::post('uploadPictures',[\App\Http\Controllers\web\BargainController::class,'uploadPictures'])->name('uploadPictures');
    //商品sku
    Route::get('getSku',[\App\Http\Controllers\web\BargainController::class,'getSku'])->name('getSku');
    //订单
    Route::get('getOrder',[\App\Http\Controllers\web\BargainController::class,'getOrder'])->name('getOrder');
    //订单删除
    Route::get('orderDel',[\App\Http\Controllers\web\BargainController::class,'orderDel'])->name('orderDel');
    //订单搜索
    Route::get('searchOrder',[\App\Http\Controllers\web\BargainController::class,'searchOrder'])->name('searchOrder');
    //订单修改1
    Route::get('getOrderOne',[\App\Http\Controllers\web\BargainController::class,'getOrderOne'])->name('getOrderOne');
    //订单修改2
    Route::post('getOrderAdd',[\App\Http\Controllers\web\BargainController::class,'getOrderAdd'])->name('getOrderAdd');
    //设置规则
    Route::post('goodsSet',[\App\Http\Controllers\web\BargainController::class,'goodsSet'])->name('goodsSet');
    //分销
    Route::get('getInfinite',[\App\Http\Controllers\web\BargainController::class,'getInfinite'])->name('getInfinite');
});
//分销
Route::prefix('distribution')->group(function(){
    //会员设置
    Route::post('memberSet',[\App\Http\Controllers\web\DistributionController::class,'memberSet'])->name('memberSet');
    //获取设置
    Route::get('getSet',[\App\Http\Controllers\web\DistributionController::class,'getSet'])->name('getSet');
    //列表
    Route::get('enterList',[\App\Http\Controllers\web\DistributionController::class,'enterList'])->name('enterList');
    //单条数据
    Route::get('getDistribution',[\App\Http\Controllers\web\DistributionController::class,'getDistribution'])->name('getDistribution');
    //分销删除
    Route::get('distributionDel',[\App\Http\Controllers\web\DistributionController::class,'distributionDel'])->name('distributionDel');
    //修改
    Route::post('distributionUpdate',[\App\Http\Controllers\web\DistributionController::class,'distributionUpdate'])->name('distributionUpdate');
    //添加
    Route::post('distributionAdd',[\App\Http\Controllers\web\DistributionController::class,'distributionAdd'])->name('distributionAdd');
    //佣金记录
    Route::get('getRecord',[\App\Http\Controllers\web\DistributionController::class,'getRecord'])->name('getRecord');
    //佣金记录搜索
    Route::get('recordSearch',[\App\Http\Controllers\web\DistributionController::class,'recordSearch'])->name('recordSearch');
    //营业额统计
    Route::get('statistics',[\App\Http\Controllers\web\DistributionController::class,'statistics'])->name('statistics');
    //线下统计
    Route::get('offline',[\App\Http\Controllers\web\DistributionController::class,'offline'])->name('offline');
    //余额统计
    Route::get('balance',[\App\Http\Controllers\web\DistributionController::class,'balance'])->name('balance');
    //商品支付统计
    Route::get('goodsPay',[\App\Http\Controllers\web\DistributionController::class,'goodsPay'])->name('goodsPay');

});
//仓库
Route::prefix('admin')->group(function () {
//    仓库查询
    Route::get('warehouseList', [\App\Http\Controllers\web\WarehouseController::class, 'warehouseList']);
//    仓库添加
    Route::post('CreateWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'CreateWarehouse']);
//    仓库修改
    Route::post('warehouseUpdate', [\App\Http\Controllers\web\WarehouseController::class, 'warehouseUpdate']);
//     入库商品查询
    Route::get('InWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'InWarehouse']);
//    入库商品添加
    Route::post('createInWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'createInWarehouse']);
//    入库商品修改
    Route::post('updateInWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'updateInWarehouse']);
//    入库商品删除
    Route::delete('deleteInWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'deleteInWarehouse']);
//    出库商品查询
    Route::get('ToWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'ToWarehouse']);
//    出库商品添加
    Route::post('createToWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'createToWarehouse']);
//    出库商品修改
    Route::post('updateToWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'updateToWarehouse']);
//    出库商品删除
    Route::delete('deleteToWarehouse', [\App\Http\Controllers\web\WarehouseController::class, 'deleteToWarehouse']);
    Route::post('uploadImg', [\App\Http\Controllers\web\WarehouseController::class, 'uploadImg']);
});

///商品分类展示
Route::prefix('category')->group(function () {
    //分类列表展示
    Route::get('index', [ProductController::class, 'index']);
    //分类展示
    Route::get('categoryList', [ProductController::class, 'categoryList']);
    //分类添加入库
    Route::post('save', [ProductController::class, 'save']);
    //分类图标上传
    Route::post('upload', [ProductController::class, 'upload']);
    //分类修改之前的查询
    Route::get('edit/{id}', [ProductController::class, 'edit']);
    //分类修改
    Route::post('updateCategory/{id}', [ProductController::class, 'updateCategory']);
    //分类删除
    Route::get('delCategory/{id}', [ProductController::class, 'delete']);
    //分类状态修改
    Route::get('change/{id}', [ProductController::class, 'change']);
});

Route::prefix('goods')->group(function () {
    //获取商品列表
    Route::get('goodsList', [ProductController::class, 'goodsList']);
    //排行榜
    Route::get('rankList', [ProductController::class, 'rankList']);
    //订单信息物流跟踪
    Route::get('express', [ProductController::class, 'express']);
    //根据订单生成二维码
    Route::get('qrCode', [\App\Http\Controllers\web\OrderController::class, 'qrCode']);
    //提货
    Route::get('pickUp', [\App\Http\Controllers\web\OrderController::class, 'pickUp']);

});
//我的账户信息展示
Route::get('perDetails/{uid}', [UserLoginController::class, 'perDetails']);

//后台订单类
//订单查询
Route::get('OrderInquiry', [\App\Http\Controllers\web\OrderController::class, 'OrderInquiry']);
//订单增加
Route::post('OrderAdd', [\App\Http\Controllers\web\OrderController::class, 'OrderAdd']);
Route::post('OrderAdd',[\App\Http\Controllers\web\OrderController::class,'OrderAdd']);
//订单后台删除
Route::post('OrderDelete',[\App\Http\Controllers\web\OrderController::class,'OrderDelete']);
//订单后台支付状态修改
Route::post('OrDerUpdate',[\App\Http\Controllers\web\OrderController::class,'OrderUpdate']);
//提货
Route::prefix('/')->group(function (){
    //取货修改订单状态
    Route::post('status_update',[\App\Http\Controllers\web\ProductBoundController::class,'statusUpdate']);
    //订单列表
    Route::get('dist',[\App\Http\Controllers\web\ProductBoundController::class,'dist']);
    //订单列表搜索
    Route::get('get_order_name', [\App\Http\Controllers\web\ProductBoundController::class, 'dist']);
});

Route::prefix('member')->group(function(){
//    会员类型*
    Route::get('memberType', [\App\Http\Controllers\web\MemberController::class, 'memberType']);
//    会员类型添加
    Route::get('memberTypeAdd', [\App\Http\Controllers\web\MemberController::class, 'memberTypeAdd']);
    Route::post('memberTypeAdd',[\App\Http\Controllers\web\MemberController::class,'memberTypeAdd']);
//    会员类型删除
    Route::get('memberTypeDel', [\App\Http\Controllers\web\MemberController::class, 'memberTypeDel']);
//    会员类型修改
    Route::get('memberTypeEditor', [\App\Http\Controllers\web\MemberController::class, 'memberTypeEditor']);
//    会员类型是否开启
    Route::get('memberTypeBegin', [\App\Http\Controllers\web\MemberController::class, 'memberTypeBegin']);

//    会员权益*
    Route::get('memberEquity', [\App\Http\Controllers\web\MemberController::class, 'memberEquity']);
//    会员权益编辑
    Route::get('memberEquityEditor', [\App\Http\Controllers\web\MemberController::class, 'memberEquityEditor']);

//    卡密会员
    Route::get('memberSiberian', [\App\Http\Controllers\web\MemberController::class, 'memberSiberian']);
//    生成卡密
    Route::get('SiberianCreate', [\App\Http\Controllers\web\MemberController::class, 'SiberianCreate']);
//    批量添加卡密会员
    Route::get('memberSiberianAdd', [\App\Http\Controllers\web\MemberController::class, 'memberSiberianAdd']);
//    卡密激活
    Route::get('siberianActivate', [\App\Http\Controllers\web\MemberController::class, 'siberianActivate']);
//    卡密会员搜索
    Route::get('memberSiberianSearch', [\App\Http\Controllers\web\MemberController::class, 'memberSiberianSearch']);
//    会员记录
    Route::get('memberRecord', [\App\Http\Controllers\web\MemberController::class, 'memberRecord']);
//    会员记录搜索
    Route::get('memberRecodeSearch', [\App\Http\Controllers\web\MemberController::class, 'memberRecodeSearch']);
});
//门店管理
Route::prefix('/')->group(function (){
    //门店列表
    Route::get('store_list', [\App\Http\Controllers\web\SystemStoreController::class, 'storeList']);
    //搜索
    Route::get('search_list', [\App\Http\Controllers\web\SystemStoreController::class, 'storeList']);
    //添加门店
    Route::post('store_create', [\App\Http\Controllers\web\SystemStoreController::class, 'storeCreated']);
    //修改数据查询
    Route::get('store_edit/{id}', [\App\Http\Controllers\web\SystemStoreController::class, 'storeEdit']);
    //门店修改
    Route::post('store_update/{id}', [\App\Http\Controllers\web\SystemStoreController::class, 'storeUpdate']);
    //门店删除
    Route::delete('del/{id}', [\App\Http\Controllers\web\SystemStoreController::class, 'del']);
    //审核门店
    Route::post('update_status/{id}', [\App\Http\Controllers\web\SystemStoreController::class, 'update_status']);
    //门店商品
    Route::get('product_list', [\App\Http\Controllers\web\SystemStoreController::class, 'productList']);
    //门店商品搜索
    Route::get('system_product_search', [\App\Http\Controllers\web\SystemStoreController::class, 'productList']);
    //门店商品审核
    Route::put('system_product_update', [\App\Http\Controllers\web\SystemStoreController::class, 'systemProductUpdate']);
    //门店商品删除
    Route::delete('system_del/{id}', [\App\Http\Controllers\web\SystemStoreController::class, 'systemDel']);
    //门店流水
    Route::get('store_flow', [\App\Http\Controllers\web\SystemStoreController::class, 'storeFlow']);
    //分组列表
    Route::get('group_list', [\App\Http\Controllers\web\SystemStoreGroupController::class, 'GroupList']);
    //添加分组
    Route::post('add_group', [\App\Http\Controllers\web\SystemStoreGroupController::class, 'addGroup']);
    //门店删除
    Route::delete('group_del/{id}', [\App\Http\Controllers\web\SystemStoreGroupController::class, 'groupDel']);
    //分组修改
    Route::post('group_update/{id}', [\App\Http\Controllers\web\SystemStoreGroupController::class, 'groupUpdate']);
    //搜索
    Route::get('es', [\App\Http\Controllers\web\SystemStoreController::class, 'es']);
});
//团长管理 wf
Route::prefix('head')->group(function (){
    //申请团长
    Route::post('applyHead',[\App\Http\Controllers\web\HeadController::class,'applyHead']);
    //团长列表
    Route::get('headList',[\App\Http\Controllers\web\HeadController::class,'headList']);
    //团长状态列表
    Route::get('headStatus',[\App\Http\Controllers\web\HeadController::class,'headStatus']);
    //通过/不通过
    Route::get('adopt',[\App\Http\Controllers\web\HeadController::class,'adopt']);
    //团长管理列表
    Route::get('adminHeadList',[\App\Http\Controllers\web\HeadController::class,'adminHeadList']);
    //团长修改
    Route::put('adminUpdateHead',[\App\Http\Controllers\web\HeadController::class,'adminUpdateHead']);
    //核销员删除
    Route::get('delVerifier',[\App\Http\Controllers\web\StoreMemberController::class,'delVerifier']);
    //核销员列表
    Route::get('verifierList',[\App\Http\Controllers\web\StoreMemberController::class,'verifierList']);
    //添加核销员
    Route::get('addMember',[\App\Http\Controllers\web\StoreMemberController::class,'addMember']);
    //团员列表
    Route::get('memberList',[\App\Http\Controllers\web\StoreMemberController::class,'memberList']);
    //拼团商品列表
    Route::get('combinationList',[\App\Http\Controllers\web\GroupController::class,'combinationList']);
    //团长拼团商品添加
    Route::get('addHeadGoods',[\App\Http\Controllers\web\HeadGoodsController::class,'addHeadGoods']);
    //团长es
    Route::get('search',[\App\Http\Controllers\web\HeadController::class,'search']);
});

// szk
Route::prefix('discount')->group(function () {
    // 优惠券列表
    Route::get('/listview', [\App\Http\Controllers\web\DiscountCouponController::class, 'listview']);
    // 优惠券状态(点改)
    Route::get('/change/status', [\App\Http\Controllers\web\DiscountCouponController::class, 'changeStatus']);
    // 优惠券删除
    Route::delete('/delete/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'delete']);
    // 优惠券详情查看
    Route::get('/read/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'read']);
    // 优惠券修改
    Route::post('/update/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'modification']);
    // 优惠券表总添加数据信息
    Route::post('/add', [\App\Http\Controllers\web\DiscountCouponController::class, 'add']);
    // 优惠券附表修改
    Route::post('/issue/update/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'attachedUpdate']);
    // 商品数据
    Route::get('/getGoods', [\App\Http\Controllers\web\DiscountCouponController::class, 'getGoods']);
});
    //订单量 销售额统计 cqf
    Route::get('orderAndSales',[\App\Http\Controllers\web\OrderController::class,'orderAndSales']);
    //商品浏览量排行榜 cqf
    Route::get('productRankList',[ProductController::class,'productRankList']);
